﻿using System;

namespace exercise2
{
	class exercise2
	{
		static void Main(string[] args)
		{
			Console.WriteLine("请输入下限");
			String low = Console.ReadLine();
			Console.WriteLine("请输入上限");
			String high = Console.ReadLine();
			int low1;
			low1 = int.Parse(low);
			int high1 = int.Parse(high);
			int m = 0;
			for (int i = low1; i < high1; i++)
			{

				if (Check(i))
				{
					Console.Write(i + " ");
					m++;
					if (m % 10 == 0)
					{
						Console.WriteLine(" ");
					}
				}
			}

		}
		private static bool Check(int n)
		{
			int m = 0;
			for (int i = 2; i < n; i++)
			{
				if (n % i == 0)
					m++;
			}
			if (m == 0)
				return true;

			else
				return false;
		}
	}
}